import request from '@/utils/request'

/**
 * 分页查询
 */
export const queryPage = (pageNo, pageSize) => {
	return request({
		url: 'mainCategory/'+pageNo+"/"+pageSize,
		method: 'get'
	})
}
/**
 * 根据id查询
 */
export const queryById = (id) => {
	return request({
		url: 'mainCategory/'+id,
		method: 'get'
	})
}
/**
 * 根据id分页查询下面的1级分类
 */
export const queryOneLevelCategory = (id,pageNo,pageSize) => {
	return request({
		url: 'mainCategory/offspring/'+id+"/"+pageNo+"/"+pageSize,
		method: 'get'
	})
}
/**
 * 根据id分页查询下面的文章列表
 */
export const offspringArticle = (id,pageNo,pageSize) => {
	return request({
		url: 'mainCategory/offspring/article/'+id+"/"+pageNo+"/"+pageSize,
		method: 'get'
	})
}
/**
 * 根据栏目id查询十篇置顶推荐文章
 */
export const toppingArticles = (id) => {
	return request({
		url: 'mainCategory/offspring/article/queryToppingArticles/'+id,
		method: 'get'
	})
}